<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>국가법령정보센터</title>
		<link href="http://code.jquery.com/mobile/latest/jquery.mobile.min.css" rel="stylesheet" type="text/css" />
		<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
		<script src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script>
		<link rel="stylesheet" href="../css/jqm-docs.css"/>
		<!-- Start PhoneGap Framework -->
		<script type="text/javascript" charset="utf-8" src="../js/phonegap-1.1.0.js"></script>
		<script type="text/javascript" charset="utf-8">

    // Call onDeviceReady when PhoneGap is loaded.
    //
    // At this point, the document has loaded but phonegap.js has not.
    // When PhoneGap is loaded and talking with the native device,
    // it will call the event `deviceready`.
    //
    function onLoad() {
        document.addEventListener("deviceready", onDeviceReady, false);
    }

    // PhoneGap is loaded and it is now safe to make calls PhoneGap methods
    //
    function onDeviceReady() {
        // Register the event listener
        document.addEventListener("searchbutton", onSearchKeyDown, false);
    }

    // Handle the search button
    //
    function onSearchKeyDown() {
    	alert("onSearchKeyDown()");
    }

    </script>
    <script language="JavaScript">
		function sendMessage(msg){
			if(isCheck()) return;
			window.HybridApp.setMessage(msg);
		}

		function isCheck(){
			if(document.getElementById('target').value != 'law'){
				jqmSimpleMessage('서비스 준비중 입니다.');
				return true;
			}else{
				return false;
			}
		}

		function jqmSimpleMessage(message) {
	    $("<div class='ui-loader ui-overlay-shadow ui-body-b ui-corner-all'><h1>" + message + "</h1></div>")
	        .css({
	            display: "block",
	            opacity: 0.96,
	            top: window.pageYOffset+100
	        })
	        .appendTo("body").delay(800)
	        .fadeOut(500, function(){
	            $(this).remove();
	        });
		}
		</script>
		<!-- End PhoneGap Framework -->
	</head>
<body onload="onLoad();">
<!-- page-->
	<div data-role="page" data-fullscreen="false">

		<!-- header -->
		<div data-role="header" data-theme="f" data-position="fixed">
			<a href="http://oraking.springnote.com" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a>
			<h1>국가법령정보센터</h1>
		</div>
		<!-- /header -->

		<div data-role="content">
			<ul data-role="listview">
				<li data-role="fieldcontain">
		       		<input type="search" name="keyword" id="keyword" value=""  />
				</li>
				<li data-role="fieldcontain">
					<select name="target" id="target" data-native-menu="false" data-theme="f" data-overlay-theme="e">
						<option value="law">대한민국현행법령</option>
						<option value="nwlaw">법령연혁(+현행)</option>
						<option value="admrul">행정규칙(중앙)</option>
						<option value="ordin">자치법규(지방)</option>
						<option value="prec">판례</option>
						<option value="detc">헌재결정례</option>
						<option value="prec">법령해석례</option>
						<option value="decc">행정심판례</option>
						<option value="trty">조약</option>
						<option value="lstrm">용어집</option>
					</select>
				</li>
						<li class="ui-body ui-body-b">
							<fieldset class="ui-grid-a">
	                            <div class="ui-block-a"><input type="reset" value="Reset" data-theme="d" /></div>
								<div class="ui-block-b"><input type="button" value="Search" data-theme="f" onclick="sendMessage('keyword=' + document.getElementById('keyword').value + '&' + 'target=' + document.getElementById('target').value)" data-theme="a"/></div>
						    </fieldset>
						</li>

					</ul>
			</div>

		<div data-role="footer" data-theme="f" data-position="fixed">
			<p>&copy; oraKing.springnote.com</p>
		</div>
	</div>
	<!-- /page-->
</body>
</html>